<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name=viewport	content='width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no'>
	<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="0" />
	<title>公司官网 </title>
	<link href="${resPath}/icon/uiot.ico" rel="SHORTCUT ICON">
</head>
<body>
<script>
	function browserRedirect() {
		var sUserAgent = navigator.userAgent.toLowerCase();
		var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
		var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
		var bIsMidp = sUserAgent.match(/midp/i) == "midp";
		var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
		var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
		var bIsAndroid = sUserAgent.match(/android/i) == "android";
		var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
		var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
		var urlParam=GetRequest();
		var searchKey=urlParam['S'];
		var searchParam = "";
		if(undefined==searchKey){
			searchParam = "";
		}else{
			searchParam = "?S=" + searchKey;
		}
		localStorage.setItem("searchKey", searchKey);
		if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
			//跳转手机端页面
			window.location.href="mobile/index.html"+searchParam;
		} else {
			//跳转web端页面
			//window.location.href="web/index.html";
			window.location.href="web/index.html"+searchParam;
		}
	}
	function GetRequest() {
		var url = location.search; //获取url中"?"符后的字串
		var theRequest = new Object();
		if (url.indexOf("?") != -1) {
			var str = url.substr(1);
			strs = str.split("&");
			for (var i = 0; i < strs.length; i++) {
				theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
			}
		}
		return theRequest;
	}
	browserRedirect();
</script> 
</body>
</html>